<?php $this->pageTitle = Yii::app()->user->name; ?>
<div class="c_body">
	<div class="search_block cat_search_block">
		<form action="<?php echo Yii::app()->createUrl('search/index', array('tab'=>'video'));?>" rel="<?php echo Yii::app()->createUrl('search/index', array('tab'=>'video'));?>" id="cat_search">
			<div class="search_fld">
				<div class="search_icon"></div>
				<input type="hidden" name="tab" value="video" />
				<input type="text" value="Поиск по композициям" name="text" id="search_audio" />
			</div>
		</form>
	</div>
	<div class="cat_head">
		<div class="cat_head_strip"></div>
		<?php if($checkOwner):?>
			<a href="<?php echo Yii::app()->createUrl('video/createGroup', array('group'=>Yii::app()->request->getParam('group')));?>" class="green_btn r_m"><i>+</i>Добавить Видео</a>
		<?php endif; ?>
		<div class="cat_head_h t">
			<p class="cat_head_h_txt"><span><?php echo count($data);?></span> видеозаписей</p>
			<?php if($checkOwner):?>
				<a class="cat_head_h_edit" href="<?php echo Yii::app()->createUrl('video/adminGroup', array('group'=>Yii::app()->request->getParam('group')));?>">Редактировать</a>
			<?php endif; ?>
		</div>
	</div>
	<div class="cat_list_block">
		<div class="cat_list">
			<?php foreach ($data as $key => $video){ ?>
				<div class="cat_list_item video_list_item">
					<a class="u_media" href="<?php echo Yii::app()->createUrl('video/viewGroup', array('id'=>$video->id, 'group'=>Yii::app()->request->getParam('group')));?>">
						<img width="180" height="143" border="0" alt="" src="<?php echo VideoPreview::getVideoPreview($video->video->code); ?>">
						<div class="play"></div>
						<div class="mask"></div>
					</a>
					<div class="u_media_nav">
						<a href="<?php echo Yii::app()->createUrl('video/viewGroup', array('id'=>$video->id, 'group'=>Yii::app()->request->getParam('group')));?>" class="u_media_nav_name"><?php echo $video->name?></a>
						<!-- <p class="media_time">12:53</p> -->
					</div>
				</div>
			<?php } ?>	
		</div>
	</div>
	<div class="clear"></div>
</div>